#include "android_env.h"

int android_key_get()
{
    int detach = 0;
    jmethodID method = NULL;

    JNIEnv *env = initJavaCallbackMethod(&method, "ddi_key_read", "()I", &detach);
    if (env == NULL || method == NULL)
    {
        return 0;
    }

    int key = (*env)->CallIntMethod(env, mCallbackObj, method);
    detach_thread(detach);
    return key;
}
